{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
<div id="subheader">
    <h1>{{view_user.username}}</h1>
    
</div>

<table width="950">
    <tr>
    <!--cell-->
        <td width="170" style="vertical-align: top;">
            <table>
                <tr>
                    <td style="padding: 20px 20px 8px;">
                        {% gravatar view_user 128 %}
                    </td>
                </tr>
                <tr>
                    <td class="summaryinfo">
                        <div class="summarycount">{{view_user.reputation|intcomma}}</div>
                        <div style="margin-top: 5px; font-weight: bold;">积分</div>
                    </td>
                </tr>
            </table>
        </td>
        <!--cell-->
        <td width="350" style="vertical-align: top;">
            <div style="float: right; margin-top: 19px; margin-right: 10px;">
                {% if request.user|can_view_user_edit:view_user %}
                <a href="/users/{{ view_user.id }}/edit/">更新我的资料</a>
                {% endif %}
            </div>
            <h2 style="margin-top: 20px;">注册用户</h2>
            <table class="user-details">
                <tr>
                    <th width="120" ></th>
                    <th width="230" ></th>
                </tr>
                {% if view_user.real_name %}
                <tr>
                    <td >姓名</td>
                    <td ><b>{{view_user.real_name}}</b></td>
                </tr>
                {% endif %}
                <tr>
                    <td>已加入</td>
                    <td>{{ view_user.date_joined|timesince }}</td>
                </tr>
                {% if view_user.last_seen %}
                <tr>
                    <td>上次活动时间</td>
                    <td><span class="relativetime" title="{{ view_user.last_seen }}">{{ view_user.last_seen|timesince }}前</span></td>
                </tr>
                {% endif %}
                {% if view_user.website %}
                <tr>
                    <td>个人网站</td>
                    <td><a rel="nofollow" target="_blank" href="{{view_user.website}}">{{view_user.website}}</a></td>
                </tr>
                {% endif  %}
                {% if view_user.location %}
                <tr>
                    <td>城市</td>
                    <td>{{view_user.location}}</td>
                </tr>
                {% endif %}
                {% if view_user.date_of_birth%}
                <tr>
                    <td>年龄</td>
                    <td>{% get_age view_user.date_of_birth %} 岁</td>
                </tr>
                {% endif %}
                {% if votes_today_left %}
                <tr>
                    <td>今日剩余投票数</td>
                    <td><span class="big darkred">{{ votes_today_left }}</span> 票</td>
                </tr>
                {% endif %}
            </table>
        </td>
        <!--cell-->
        <td width="380">
            <div id="user-about-me">
            {% if view_user.about %}
                {{view_user.about|safe|linebreaks}}
            {% endif %}
            </div>
        </td>
    </tr>
</table>